import request from '@/utils/request'

// 查询退款列表
export function listRefund(query) {
  return request({
    url: '/bussiness/refund/list',
    method: 'get',
    params: query
  })
}

// 查询退款详细
export function getRefund(id) {
  return request({
    url: '/bussiness/refund/' + id,
    method: 'get'
  })
}

// 新增退款
export function addRefund(data) {
    return request({
      url: '/bussiness/refund',
      method: 'post',
      data: data
    })
  }
  // 退款审核通过
  export function refundAudit(data) {
    return request({
      url: '/bussiness/refund/review',
      method: 'post',
      data: data
    })
  }
  // 退款审核拒绝
  export function refundReject(data) {
    return request({
      url: '/bussiness/refund/reject',
      method: 'post',
      data: data
    })
  }

// 修改退款
export function updateRefund(data) {
  return request({
    url: '/bussiness/refund',
    method: 'put',
    data: data
  })
}

// 删除退款
export function delRefund(id) {
  return request({
    url: '/bussiness/refund/' + id,
    method: 'delete'
  })
}
